package edu.zut.main.thread;

public class ThreadDaemon {

    public static void main(String[] args) {

        Thread threadA = new Thread(() -> {
            System.out.println(Thread.currentThread().getName() + "执行....");
        }, "threadA");
        //设置当前线程为守护线程    必须有用户线程才有守护线程
        threadA.setDaemon(true);

        threadA.start();

    }

}
